package com.zhongwang.mms.module.purchase.dao;

import com.zhongwang.mms.gen.entity.TProject;
import com.zhongwang.mms.gen.entity.TProjectExample;
import com.zhongwang.mms.module.purchase.model.VWProject;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface PurTProjectDao {
    long countByExample(TProjectExample example);

    int deleteByExample(TProjectExample example);

    int deleteByPrimaryKey(Integer proId);

    int insert(TProject record);

    int insertSelective(TProject record);

    List<TProject> selectByExample(TProjectExample example);

    TProject selectByPrimaryKey(Integer proId);

    int updateByExampleSelective(@Param("record") TProject record, @Param("example") TProjectExample example);

    int updateByExample(@Param("record") TProject record, @Param("example") TProjectExample example);

    int updateByPrimaryKeySelective(TProject record);

    int updateByPrimaryKey(TProject record);

    /**
     *@FunctionName: findDataBoardProjectByCode
     *@Description: 根据项目号获取看板系统项目信息
     *@Author: 徐一贺
     *@CreateDate: 2020/3/25 10:39
     *@Phone: 18241927380
     *@Param: code 项目号
     *@Return:  TProject获取的看板系统项目信息
     *@Version: 1.0.0
     */
    VWProject findDataBoardProjectByCode(String code);

    /**
     *@FunctionName: findProjectByCode
     *@Description: 根据项目号获取项目信息
     *@Author: 徐一贺
     *@CreateDate: 2020/3/25 10:39
     *@Phone: 18241927380
     *@Param: ityProCode 项目号
     *@Return:  TProject获取的项目信息
     *@Version: 1.0.0
     */
    TProject findProjectByCode(String ityProCode);

    /**
     *@FunctionName: updateByCode
     *@Description: 根据项目号更新项目信息
     *@Author: 徐一贺
     *@CreateDate: 2020/3/25 10:39
     *@Phone: 18241927380
     *@Param: troject 更新的项目信息
     *@Return:
     *@Version: 1.0.0
     */
    void updateByCode(TProject troject);
}